﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;


namespace WaterRevenueMS.Domain.ViewModels.BasicSet.BankSet
{
    public class BankSetModel : EntityCommon
    {
        public BankSetModel()
        {
            BankCodeItems = new List<SelectListItem>() {
                new SelectListItem { Text = "--- 银行代码 ---", Value = "0"}, 
                };
            Search = new SearchModel();
            {
            };
        }

        public int Id { get; set; }


        [Display(Name = "银行代码名称")]
        public string BankCode_Name { get; set; }
        public List<SelectListItem> BankCodeItems { get; set; }

        [Display(Name = "银行代码")]
        public int? Yin_HDM_No { get; set; }


        [Display(Name = "银行名称")]
        public string Yin_HMC { get; set; }

        [Display(Name = "银行简称")]
        public string Yin_HJC { get; set; }

        [Display(Name = "银行地址")]
        public string Yin_HDZ { get; set; }

        [Display(Name = "电话")]
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        public string Dian_H { get; set; }

        [Display(Name = "传真")]
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        public string Chuan_Z { get; set; }

        [Display(Name = "联系人")]
        public string Lian_XR { get; set; }

        [Display(Name = "排序序号")]
        [RegularExpression(@"\d+", ErrorMessage = "必须是数字")]
        public int OrderNo { get; set; }

        public SearchModel Search { get; set; }
    }
    public class SearchModel
    {
        public SearchModel()
        {
            BankCodeItems = new List<SelectListItem>() {
                new SelectListItem { Text = "--- 银行代码 ---", Value = "0"}, 
                };
        }
        [Display(Name = "银行代码名称")]
        public string BankCode_Name { get; set; }

        public List<SelectListItem> BankCodeItems { get; set; }

        [Display(Name = "银行代码")]
        public int Yin_HDM_No { get; set; }

        [Display(Name = "银行名称")]
        public string Yin_HMC { get; set; }

        [Display(Name = "银行简称")]
        public string Yin_HJC { get; set; }

        [Display(Name = "银行地址")]
        public string Yin_HDZ { get; set; }

        [Display(Name = "电话")]
        public string Dian_H { get; set; }

        [Display(Name = "传真")]
        public string Chuan_Z { get; set; }

        [Display(Name = "联系人")]
        public string Lian_XR { get; set; }

        [Display(Name = "排序序号")]
        public int OrderNo { get; set; }


    }
}
